package com.example.good.controller;

import com.example.good.service.IWXService;
import com.example.good.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx")
public class WXController extends BaseController{
    @Autowired
    private IWXService wxService;

    @RequestMapping("{code}/login")
    public JsonResult<Object> wxLogin(
            @PathVariable String code){
        Object data = wxService.WXLogin(code);
        return new JsonResult<>(OK,data);
    }
}
